package it.xiuxian.personcenter.activity

import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import it.xiuxian.lib.base.ArouterAddress
import it.xiuxian.lib.base.BaseActivity
import it.xiuxian.personcenter.R
import it.xiuxian.personcenter.bean.WalletDetailBean
import it.xiuxian.personcenter.databinding.PersoncenterGongxianzhiBinding
import it.xiuxian.personcenter.presenter.GongXianZhiActivityPresenter
@Route(path = ArouterAddress.GONGXIANZHIACTIVITY)
class GongXianZhiActivity:BaseActivity<GongXianZhiActivityPresenter>() {
   lateinit var binding:PersoncenterGongxianzhiBinding


    override val layoutId: Int
        get() = R.layout.personcenter_gongxianzhi
    override val presenter: GongXianZhiActivityPresenter
        get() = GongXianZhiActivityPresenter()

    override fun initData() {
        //super.initData()
        mPresenter!!.getRecord()
    }

    override fun initView(){
        //super.initView()
       binding = getViewDataBinding<PersoncenterGongxianzhiBinding>()

    }

    override fun initEvent() {
       // super.initEvent()
        binding.tvDaka.setOnClickListener {ARouter.getInstance().build(ArouterAddress.QIANDAOACTIVITY).navigation() }
        binding.tvGongzuo.setOnClickListener {ARouter.getInstance().build(ArouterAddress.WORKACTIVITY).navigation()}
        binding.tvYaoqing.setOnClickListener {ARouter.getInstance().build(ArouterAddress.ZIXUNACTIVITY).navigation()}
        binding.tvQianbao.setOnClickListener { ARouter.getInstance().build(ArouterAddress.MYWALLETACTIVITY).navigation()}
        binding.tvGongxian.setOnClickListener {ARouter.getInstance().build(ArouterAddress.GONGXIANACTIVITY).navigation() }
        binding.tvXuexi.setOnClickListener { }
        binding.tvMingxi.setOnClickListener { ARouter.getInstance().build(ArouterAddress.RECORDDETAILACTIVITY).navigation()}
        binding.cons.setOnClickListener { finish() }
    }
    fun setGongXian(data: WalletDetailBean) {
          binding.tvGongxianNum.text = data.gongxianzhi
               binding.tvNum.text = data.zhgongxianzhi
               binding.tvYu.text = data.money
               binding.tvTixianNum.text = data.yitixianmoney
    }
}